import { message } from 'ant-design-vue/es';
import XEClipboard from 'xe-clipboard';
const mounted = (el, binding: any) => {
    const handleRightClick = (title) => {
        message.success('复制成功');
        XEClipboard.copy(title);
    };
    el.addEventListener('contextmenu', function (event, title) {
        event.preventDefault();
        handleRightClick(binding.value);
    }, false);
};
const vCopyText = {
    mounted
};
export const setupCopyTextDirective = (app: any) => {
    app.directive('copyText', vCopyText);
};
